Skip to content

Conversation

@stevenay
Copy link

  • Added updateIndex() function to eloquent model to be able to do partial update.

Details

Normally if we want to update an existing document, we have to reindex or replace it.

By ElasticSearch's update API, it can be able to do partial updates to a document. This update API is more efficient and reliable. According to *"elastic" guide,

"The difference is that this process happens within a shard, thus avoiding the network overhead of multiple requests. By reducing the time between the retrieve and reindex steps, we also reduce the likelihood of there being conflicting changes from other processes."

In this updateIndex(), existing scalar fields (columns) are overwritten, and new fields (columns) are added to the index.

@stevenay stevenay changed the title Add "Partial-Update to Indexed Document" Function Add "Partial-Update" Function Jul 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant